let $global = {}

const Dialog = require('../miniprogram_npm/@vant/weapp/dialog/dialog').default

const globalUtils = require('../utils/compile/index.js')
const globalVariable = require('./variable.js')
const globalApi = require('../utils/compile/api.js')
const globalHistory = require('../utils/compile/history.js')
const globalAuth = require('../utils/compile/auth.js')
const globalMixins = require('./mixins.js')
const globalLogger = require('../utils/compile/logger').default

// $global.area = require('./area')
$global.R = {}
$global.R.img = {
  appIcon: 'http://oss.kaoyanvip.cn/uploads/file1556438801380.png',
  theme2: 'http://oss.kaoyanvip.cn/uploads/file1545459099483.png',
  phoneIcon: 'http://oss.kaoyanvip.cn/uploads/file1545456575246.png',
  passIcon: 'http://oss.kaoyanvip.cn/uploads/file1545456630443.png',
  zhang: 'http://oss.kaoyanvip.cn/uploads/file1545470058088.png',
  checkedBoxActive: 'http://oss.kaoyanvip.cn/uploads/file1545634257081.png',
  checkedBoxNormal: 'http://oss.kaoyanvip.cn/uploads/file1545634261062.png',
  overlay: 'http://oss.kaoyanvip.cn/uploads/file1545640125664.png',
  icon1: 'http://oss.kaoyanvip.cn/uploads/file1545641096069.png',
  icon2: 'http://oss.kaoyanvip.cn/uploads/file1545641165280.png',
  icon3: 'http://oss.kaoyanvip.cn/uploads/file1545641179784.png',
  icon4: 'http://oss.kaoyanvip.cn/uploads/file1545641197049.png',
  noAddress: 'http://oss.kaoyanvip.cn/uploads/file1553053375083.png',
  myPlanIcon1: 'http://oss.kaoyanvip.cn/uploads/file1545702333266.png',
  myPlanIcon2: 'http://oss.kaoyanvip.cn/uploads/file1545634257081.png',
  // 首页切换ICON
  indexIcon1: 'http://oss.kaoyanvip.cn/uploads/file1545303607029.png',
  // 首页4个banner
  indexBg1: 'http://oss.kaoyanvip.cn/uploads/file1545301159899.png',
  indexBg2: 'http://oss.kaoyanvip.cn/uploads/file1545792189373.png',
  indexBg3: 'http://oss.kaoyanvip.cn/uploads/file1545792210021.png',
  indexBg4: 'http://oss.kaoyanvip.cn/uploads/file1545792233999.png',
  // 表单checkbox
  checkicon1: 'http://oss.kaoyanvip.cn/uploads/file1545891678501.png',
  checkicon2: 'http://oss.kaoyanvip.cn/uploads/file1545891721829.png',
  // 地址icon
  noBook: 'http://oss.kaoyanvip.cn/uploads/file1553053485311.png'
}

$global.History = globalHistory
$global.Mixins = globalMixins
$global.Utils = globalUtils
$global.Variable = globalVariable
$global.Api = globalApi
$global.Auth = globalAuth
$global.Reg = globalUtils.reg
$global._ = globalUtils._
$global.Logger = globalLogger

$global.Dialog = Dialog

$global.config = require('./config')
module.exports = {
  $global,
  globalUtils,
  globalMixins,
  globalVariable,
  globalApi,
  globalHistory,
}
